/**
 *
 * @description:
 * @author:junyong.hong
 * @createTime:2017/12/27
 * @version:1.0.0.0
 * @history:
 *    1、
 *    2、
 *
 */



define([
    'app'
],function (app) {
    'use strict';
    app.directive('firstDirective',function () {
        return{
            restrict:'EA',
            // template: function (elem,attr) {
            //     console.log(elem);
            //     console.log(attr);
                /**
                 * elem.html()获取到【你好！】  <div first-directive color="red"> 你好！ </div>
                 */
                // return "<span style='color:" + attr['color'] +"'>" + elem.html() + "</span>";
                // return "<h1>哈哈,<div ng-transclude=''></div></h1>";
            // },

            /**
             * true : <span style="color:red;color:red" first-directive="" color="red"> 你好！ </span>
             * false: <div first-directive="" color="red"><span style="color:red"> 你好！ </span></div>
             */
            // replace:true,//是否保留指令代码

            transclude:true,//把页面上的指令中间参数带过来
            templateUrl:'js/directive/firstDirective/firstDirective.html',


        }
    });
});


